package com.ssy.lingxi.settle.accounts.repository;


import com.ssy.lingxi.settle.accounts.entity.BusinessReconciliationDO;
import com.ssy.lingxi.settle.accounts.entity.BusinessReconciliationRowDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 业务对账单行信息Jpa仓库
 * @author Saske
 * @date 2021/12/7
 * @version 2.0.0
 */
@Repository
public interface BusinessReconciliationRowRepository extends JpaRepository<BusinessReconciliationRowDO,Long> , JpaSpecificationExecutor<BusinessReconciliationRowDO>,QuerydslPredicateExecutor<BusinessReconciliationRowDO>{

    List<BusinessReconciliationRowDO> findByReconciliationIn(List<BusinessReconciliationDO> reconciliations);

    // List<BusinessReconciliationRowDO> findByReconciliation(BusinessReconciliationDO reconciliation, Sort sort);

    List<BusinessReconciliationRowDO> findByReconciliationNo(String reconciliationNo);

    /**
     * 根据对账单id删除下属对账单行明细
     * @author Saske
     * @date 2021/12/10
     * @param reconciliationId:
     **/
    void deleteByReconciliationId(Long reconciliationId);
}
